<?php foreach($mediaInfo as $k=>$v):?>
  <?php if(($k+1)%2 == 1): ?>
  <ul class="clearfix">
  <?php endif;?>
    <?php if($v['media_type']==3){?>
    <li class="item">
      <?php if($v['path_alias']){?>
      <a href="<?php echo $v['path_alias'];?>" target="_blank" class="figure">
        <?php if($v['media_img']):?>
        <img src="<?php echo $v['media_img'];?>">
        <?php else: ?>
        <img src="/statics/front/images/article/media/avatar.jpg">
        <?php endif;?>
        <span>
          <em>VIEW THE PRODUCT</em>
        </span>
      </a>
      <?php }else{?>
      <span class="figure">
        <?php if($v['media_img']):?>
        <img src="<?php echo $v['media_img'];?>">
        <?php else: ?>
        <img src="/statics/front/images/article/media/avatar.jpg">
        <?php endif;?>
      </span>
      <?php }?>
      <p class="js-reviews">
        <?php if($v['path_alias2']){?>
        <a href="<?php echo $v['path_alias2'];?>" target="_blank"><?php echo $v['content'];?></a>
        <?php }else{?>
        <?php echo $v['content'];?>
        <?php }?>
      </p>
      <span class="view-more js-view-more"><?php echo L('_view_more_');?></span>
      <p><?php echo $v['name'];?></p>
    </li>
    <?php }else{?>
    <li class="col-sm-6 mb2x">
      <a href="<?php echo $v['path_alias'];?>" target="_blank">
        <img src="<?php echo $v['media_img'];?>">
      </a>
      <p>
        <?php echo $v['content'];?>
        <a href="<?php echo $v['path_alias'];?>" target="_blank" rel="nofollow">Read More</a>
      </p>
    </li>
    <?php }?>
  <?php if(($k+1)%2 == 0 || count($mediaInfo)==($k+1)): ?>
  </ul>
  <?php endif;?>
<?php endforeach;?>